# Maintainer: Cowington Post <cowingtonpost@gmail.com>
pkgname=ttyper
pkgver=1.4.1
pkgrel=0
pkgdesc="Terminal-based typing test"
url="https://github.com/max-niederman/ttyper/"
arch="all"
license="MIT"
makedepends="cargo cargo-auditable"
source="https://github.com/max-niederman/ttyper/archive/refs/tags/v$pkgver/ttyper-$pkgver.tar.gz"

prepare() {
	default_prepare

	cargo fetch --target="$CTARGET" --locked
}

build() {
	cargo auditable build --frozen --release
}

check() {
	cargo test --frozen
}

package() {
	install -Dm755 target/release/ttyper -t "$pkgdir"/usr/bin
}

sha512sums="
6a7354b9725d961e2ad2709fcbe110f0e4c712a3b6a688468420bb29f507dade0de4eace140deff0ff3eec62d239d3a9484be732a6f90d1ad9d5e7f07c39e401  ttyper-1.4.1.tar.gz
"
